<%= render :partial => "/tr8n/admin/common/header" %>

<div class="section_title">
	Glossary
</div>

<%= tr8n_will_filter(@terms) %>

<%=link_to_function("+ Add glossary term", "Tr8n.UI.Lightbox.show('/tr8n/admin/glossary/lb_update', {height:450})") %>

<%= form_tag("", :id => "tr8n_form") do %>
  <%= hidden_field_tag(:type, "glossary") %>
  <%= will_filter_table_tag(@terms, :columns => [
     [:checkbox, 'ids'],     
     :keyword, :description, :updated_at, 
     [:actions, lambda{|term|
        tr8n_actions_tag([
          link_to_function("Update", "Tr8n.UI.Lightbox.show('/tr8n/admin/glossary/lb_update?id=#{term.id}', {width:650})"),
          link_to_function("Delete", "deleteObjects('#{term.id}')")
        ])
     }, 'white-space: nowrap'] 
  ]) %>
<% end %>

<%= will_filter_actions_bar_tag(@terms, [
  ['Delete Selected Items', 'deleteObjects()']
]) %>

<%= render :partial => "/tr8n/admin/common/footer" %>
